package com.money.controller;

import com.money.demo.object.PersonOrder;
import com.money.service.OrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

@Slf4j
@Api(description = "用户支付订单接口")
@RequestMapping("/api/test/")
@RestController
public class OrderController {
    @Resource
    private OrderService orderService;
    @ApiOperation(value = "用户支付订单接口")
    @ResponseBody
    @RequestMapping(value = "payForGoods", method = RequestMethod.POST)
    public void payForGoods(HttpServletRequest request, @RequestBody PersonOrder personOrder) throws Exception {
        orderService.payForGoods(personOrder);
    }
}
